]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Handle keypress if numlock is enabled
authorAndrea Azzarone <andrea.azzarone@canonical.com>
Wed, 12 Sep 2018 20:13:04 +0000 (22:13 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Thu, 11 Oct 2018 07:45:44 +0000 (07:45 +0000)
Add exception to handle a keypress if numlock is enabled as we already do for
capslock. This uses Clutter.ModifierType.MOD2_MASK because at the moment there
is not a more explicit way to refer to the numlock mask.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/550
js/ui/popupMenu.js

index 0895321cbc34997b0e5ed5c9a6c5d56c8575a32f..b0a919d1bc031ba72f476682dde8fead241245ba 100644 (file)
@@ -143,9 +143,10 @@ var PopupBaseMenuItem = new Lang.Class({
     _onKeyPressEvent(actor, event) {
         let state = event.get_state();
 
-        // if user has a modifier down (except capslock)
+        // if user has a modifier down (except capslock and numlock)
         // then don't handle the key press here
         state &= ~Clutter.ModifierType.LOCK_MASK;
+        state &= ~Clutter.ModifierType.MOD2_MASK;
         state &= Clutter.ModifierType.MODIFIER_MASK;
 
         if (state)